import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import ElementUI from 'element-ui';
import Mint from 'mint-ui';
import 'mint-ui/lib/style.css'
import i18n from './i18n/i18n';
import VueQuillEditor from 'vue-quill-editor'
import 'element-ui/lib/theme-chalk/index.css';
import 'stylePath/common.scss';

import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'
Vue.use(VueQuillEditor);

Vue.config.productionTip = false;
Vue.use(ElementUI, {
  size: 'small',
  zIndex: 1000
})
Vue.use(Mint);

router.beforeEach((to, from, next) => {
  /* 路由发生变化修改页面title */
  if (to.meta.title) {
    document.title = to.meta.title
  }
  next()
})
// router.beforeEach((to, from, next) => {
//   let isLogin = sessionStorage.getItem('vrToken')
//   if (isLogin || to.path === '/login') {
//     next()
//   } else {
//     next({
//       path: '/login'
//     })
//   }
// })

new Vue({
  router,
  store,
  i18n,
  render: h => h(App)
}).$mount("#app");